﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ObjectModel.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
    	selectMenu('Product');
    </script>	

    <table>
        <tr>
            <th>Ações</th>
            <th>
                Name
            </th>
            <th>
                Description
            </th>
            <th>
                BeginDate
            </th>
            <th>
                EndDate
            </th>
            <th>
                EstimatedBegin
            </th>
            <th>
                EstimatedEnd
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new {  id=item.Id  }) %> |
                <%: Html.ActionLink("Delete", "Delete", new {  id=item.Id  })%>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.BeginDate) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.EndDate) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.EstimatedBegin) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.EstimatedEnd) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

